package com.shuiyu.cloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author rjw
 * <p>Description:   </p>
 * @ClassName ApplicationContextConfig
 * @time 2021/7/14 11:07
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced //负载均衡的开启机制，默认轮询
    public RestTemplate getResTemplate(){
        return new RestTemplate();
    }
}
